import request from '@/router/axios';
import { baseUrl } from '@/config/env';

export const listPage = (query) => request({
    url: baseUrl + '/activiti/task/todo',
    method: 'get',
    params: query
});

export const getOne = (id) => request({
    url: baseUrl + '/activiti/task/'+id,
    method: 'get',
});

export const userList = () => request({
    url: baseUrl + '/activiti/task/userList',
    method: 'get'
});

export const taskAgree = (data) => request({
    url: baseUrl + '/activiti/task/taskAgree',
    method: 'put',
    data: data
});

export const taskDisAgree = (params) => request({
    url: baseUrl + '/activiti/task/taskDisAgree',
    method: 'get',
    params: params
});


export const comments = (id) => request({
    url: baseUrl + '/activiti/task/comment/' + id,
    method: 'get'
});
export const viewById = (id) => request({
    url: baseUrl + '/activiti/task/view/' + id,
    method: 'get'
});